<template>
  <div class="props">
    传参props配置为对象时该对象被原样设置为组件内的props

    <div>{{ username }} - {{ pwd }}</div>
  </div>
</template>

<script>
import {defineComponent} from 'vue';

export default defineComponent({
  name: 'ObjectProps',
  props: ['username', 'pwd']
});
</script>

<style scoped>
.props {
  display: flex;
  flex-flow: column;
  align-items: center;
  row-gap: 10px;
}
</style>